//
//  EMSPreferencesWindowController.m
//  EVE Mac Suite
//
//  Created by Vadim Lozko on 7/14/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "EMSPreferencesWindowController.h"


@implementation EMSPreferencesWindowController

@synthesize modules=_modules;

+(EMSPreferencesWindowController*)sharedController
{
	static EMSPreferencesWindowController* sharedController;
	@synchronized(sharedController)
	{
		if(!sharedController)
		{
			sharedController = [[EMSPreferencesWindowController alloc] initWithWindowNibName:@"PreferencesWindow"];
		}
		return sharedController;
	}
	return nil;
}

-(void)awakeFromNib
{
	NSMutableArray* modulesArray = [[NSMutableArray alloc] init];
	[modulesArray addObject:generalPrefsView];
	self.modules = modulesArray;
	[modulesArray release];
	NSRect newWindowFrame = [self.window frameRectForContentRect:[generalPrefsView frame]];
	newWindowFrame.origin = [self.window frame].origin;
    newWindowFrame.origin.y -= newWindowFrame.size.height - [self.window frame].size.height;
    [self.window setFrame:newWindowFrame display:YES animate:YES];
	[[self.window contentView] addSubview:generalPrefsView];
}

-(void)dealloc
{
	self.modules = nil;
	[super dealloc];
}



@end

